<template>
    <div class="container">
        <el-tabs tab-position="left" v-model="activeName">
            <el-tab-pane name="first" label="分值计算">
                <el-table :data="tableData" border style="width: 100%">
                    <el-table-column prop="ruleName" label="指标" />
                    <el-table-column prop="score" label="扣分" />
                </el-table>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script setup>

import { ref } from "vue";
import { queryEnvCaculateRule } from '@/api/biz/networkEnv';

const activeName = ref("first");
const tableData = ref([])

function getEnvCaculateRule() {
    queryEnvCaculateRule().then(res => {
        let temp = [
            {
                ruleName: "传输不成环",
                score: res.data.transmitTypeScore
            },
            {
                ruleName: "蓄电池配置不足",
                score: res.data.batteryDurationScore
            },
            {
                ruleName: "空调未配置或故障(若站点类型为杆站类拉远点不扣分)",
                score: res.data.airconditionerStatusScore
            },
            {
                ruleName: "有台风进水风险",
                score: res.data.inletRiskScore
            },
            {
                ruleName: "有安全隐患",
                score: res.data.securityLevelScore
            },
            {
                ruleName: "无发电条件",
                score: res.data.electricGenerationScore
            }
        ]
        tableData.value = temp
    })
}

getEnvCaculateRule()





</script>